﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ShoppingApp
{
    public partial class Advanced : System.Web.UI.Page
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("PreInit method");
            if (Request.Form != null && Request.Form.Count > 0)
            {
                for(int i = 0; i < Request.Form.Count; i++)
                {
                    System.Diagnostics.Debug.WriteLine(i);
                    System.Diagnostics.Debug.WriteLine(Request.Form[i].ToString());
                }


                System.Diagnostics.Debug.WriteLine("This is value of ");
                System.Diagnostics.Debug.WriteLine(Request.Form[6].ToString());
                if (Request.Form[6].ToString().Trim() == "sampleTheme")
                {
                    this.Theme = Request.Form[6].Trim();
                }
                else
                {
                    this.Theme = null;
                }
            }

        }

        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
    }
}